<template>
    <div class='depotEnter'>
        <div class="searchInput">
            <div>
                <input type="text"  @input="search">
            </div>
        </div>
        <listOdd :data="data" :type="'入库'"></listOdd>
    </div>
</template>

<script>
import listOdd from '@/components/common/listOdd.vue';
import searchInput from '@/components/common/searchInput.vue';

export default {
    data(){
        return {
            data:[],
            filterData:{        //数据加载条数
                page:1,
                rows:10,
            }
        }
    },
    methods:{
        search(e){
                let value = e.mp.detail.value;
                this.$https.get(`http://rap2api.taobao.org/app/mock/22254/lyl/xiaochengxu/search?value=${value}`).then(res=>{
                   this.data = res.data.data ;
                })
        },

    },
    mounted(){
        this.$https.post("token/authentication/warehouse/wait_in_list",{page:1,rows:10}).then(res=>{
               this.data = res.data.data ;
        })
    },
     components:{
        listOdd,
        searchInput
    },
     onReachBottom(){       //监听上啦加载, 还没写完
            this.filterData.page+=1 ;

             this.$https.post("token/authentication/warehouse/wait_in_list",this.filterData).then(res=>{
               this.data = res.data.data ;
        })
        }
}
</script>


<style lang="scss" scoped>
        .depotEnter{
            height:100%;
        }
</style>
